//
//  DetailViewController.m
//  FiveWork
//
//  Created by lanou3g on 15/11/20.
//  Copyright © 2015年 Project. All rights reserved.
//

#import "DetailViewController.h"

@interface DetailViewController ()<UIWebViewDelegate>
@property(nonatomic,strong)UIWebView *webView;
@end

@implementation DetailViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // 从导航栏以下开始计算
    if ([self respondsToSelector:@selector(setEdgesForExtendedLayout:)]) {
        self.edgesForExtendedLayout = UIRectEdgeNone;
    }
    
    
    self.webView =[[UIWebView alloc] initWithFrame:self.view.frame];
    
    self.view.backgroundColor =[UIColor whiteColor];
    self.webView.backgroundColor =[UIColor whiteColor];
    [self.view addSubview:self.webView];
    
    
    [self.tabBarController.tabBar setHidden:YES];
    NSURLRequest *request =[NSURLRequest requestWithURL:[NSURL URLWithString:self.urlString]];
    [self.webView loadRequest:request];
    
    self.webView.delegate =self;
    self.navigationItem.leftBarButtonItem =[[UIBarButtonItem alloc] initWithTitle:@"返回" style:UIBarButtonItemStylePlain target:self action:@selector(fanhui:)];
    
    
    // Do any additional setup after loading the view.
}

-(void)fanhui:(UIBarButtonItem* )bar{
    [self.tabBarController.tabBar setHidden:NO];
    [self.navigationController popViewControllerAnimated:YES];
}




- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
